package extend;

/**
 * @author shkstart
 * @date 2022/5/7 - 21:37
 */
public class Person extends Creature {
     String name;
     private int age;

    public Person(){

    }

    public Person(String name, int age){
        this.name = name;
        this.age = age;
    }

    private void eat(){
        System.out.println("吃饭");
    }

    public void love(){
        System.out.println("爱");
        eat();
    }
    public void setAge(int age) {
        this.age = age;
    }
    public int getAge() {
        return age;
    }
}
